<template>
  <div class="meng">
    <div class="wutai">
      <div class="offense item">
    <div class="zi">{{teamData.offense}}</div>

      </div>
     <div class="pk">
       <!-- vs -->
       <img class="pkImg" :src="pageSrc.goImg" >
     </div>
      <div class="defender item">
    
    <div class="zi">{{teamData.defender}}</div>
      </div>

    </div>
  </div>
</template>

<script>
import vsImg from "@/assets/img/vs.png";
import goImg from "@/assets/img/go.png";

export default {
  name: "fight",
  data() {
    return {
      pageSrc: {
        vsImg,
        goImg
      }
    };
  },
  methods: {},
  props: ["teamData"]
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scoped>
.meng {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.911);
  top: 0;
  left: 0;
  z-index: 1;
  .wutai {
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 50%;
    transform: translateY(-50%);
    .pk {
      text-align: center;
      width: 30%;
      animation: tada 10s linear infinite;

      .pkImg {
        width: 100%;
        margin-left: -10%;
        transform: scale(2.2);
      }
    }
    .item {
      font-size: 5rem;
      position: relative;
      // text-shadow: 0 0 20px rgb(212, 17, 17);
      &::before {
        width: 130%;
        height: 3px;
        content: "";
        position: absolute;
      }
      &.offense {
        .zi {
          animation: slideInDown 0.8s;
        }
        &::before {
          background-color: #fff;
          top: -10%;
          left: -20%;
          animation: slideInLeft 0.8s 0.5s;
        }
        text-shadow: 0 0 20px rgb(212, 17, 17);
      }
      &.defender {
        .zi {
          animation: slideInUp 0.8s;
        }
        text-shadow: 0 0 20px rgb(17, 140, 212);
        &::before {
          animation: slideInRight 0.8s 0.5s;
          background-color: rgb(207, 19, 19);
          bottom: -50%;
          left: 10%;
        }
      }
    }
  }
}
@keyframes slideInDown {
  from {
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
    visibility: visible;
  }

  to {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}
@keyframes slideInUp {
  from {
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
    visibility: visible;
  }

  to {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}
@keyframes slideInLeft {
  from {
    -webkit-transform: translate3d(-100%, 0, 0);
    transform: translate3d(-100%, 0, 0);
    visibility: visible;
  }

  to {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}
@keyframes slideInRight {
  from {
    -webkit-transform: translate3d(100%, 0, 0);
    transform: translate3d(100%, 0, 0);
    visibility: visible;
  }

  to {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}
@keyframes tada {
  10%,
  20% {
    transform: rotate3d(0, 0, 1, -1deg);
  }

  30%,
  50%,
  70%,
  90% {
    transform: rotate3d(0, 0, 1, 1deg);
  }
  40%,
  60%,
  80% {
    transform: rotate3d(0, 0, 1, -1deg);
  }
}
</style>
